<%inherit file="base.html"/>
<%def name="title()">Asset history</%def>

<div ex:role="collection" id="position" ex:itemTypes="position"></div>
<div ex:role="collection" id="transaction" ex:itemTypes="transaction"></div>
<table>
    <tr><td>
        <h2>Position history</h2>
<div ex:role="view"
     ex:viewClass="Tabular" ex:collectionID="position"
     ex:showSummary="false"
     ex:columns=".UNITS, .UNITPRICE, .MKTVAL, .DTASOF"
     ex:columnLabels="units, price, value, date"
     ex:formats="date { mode: short }  number { decimal-digits: 2 }"
     ex:sortColumn="3"
     ex:sortAscending="false"
     ex:showToolbox="true">
    <table style="display: none;">
        <tr>
            <td style="text-align:right"><span ex:content=".UNITS"></span></td>
            <td style="text-align:right"><span ex:content=".UNITPRICE"></span></td>
            <td style="text-align:right"><span ex:content=".MKTVAL"></span></td>
            <td><span ex:content=".DTASOF"></span></td>
        </tr>
    </table>
</div>
        </td>
        <td width="25%">
<div ex:role="facet" ex:expression=".ACCTID" ex:facetLabel="Position account" ex:collectionID="position"></div>
<div ex:role="facet" ex:expression=".DTASOF" ex:facetLabel="Position date" ex:sortDirection="reverse"  ex:collectionID="position"></div>
        </td>
    </tr>
    <tr>
        <td>
            <h2>Transaction history</h2>
<div ex:role="view"
     ex:viewClass="Tabular" ex:collectionID="transaction"
     ex:showSummary="false"
     ex:columns=".label, .DTTRADE, .tran, .units, .UNITPRICE, .TOTAL, .mEMO"
     ex:columnLabels="id, date, type, units, price, total, memo"
     ex:formats="date { mode: short }  number { decimal-digits: 2 }"
     ex:sortColumn="1"
     ex:sortAscending="false"
     ex:showToolbox="true">
    <table style="display: none;">
        <tr>
            <td><span ex:content=".label"></span></td>
            <td><span ex:content=".DTTRADE"></span></td>
            <td><span ex:content=".tran"></span></td>
            <td style="text-align:right"><span ex:content=".units"></span></td>
            <td style="text-align:right"><span ex:content=".UNITPRICE"></span></td>
            <td style="text-align:right"><span ex:content=".TOTAL"></span></td>
            <td><span ex:content=".mEMO"></span></td>
        </tr>
    </table>
</div>
        </td>
        <td width="25%">
            <b>Search transaction:</b>
<div ex:role="facet" ex:facetClass="TextSearch"></div>
            <hr/>
<div ex:role="facet" ex:expression=".ACCTID" ex:facetLabel="Transaction account" ex:collectionID="transaction"></div>
<div ex:role="facet" ex:expression=".tran" ex:facetLabel="Type" ex:collectionID="transaction"></div>
<div ex:role="facet" ex:expression=".DTTRADE" ex:facetLabel="Transaction date" ex:collectionID="transaction"></div>
        </td>
    </tr>
</table>
